package cn.yanjr.system.dao;

import java.sql.SQLException;
import java.util.List;

import cn.yanjr.common.dao.BaseDao;
import cn.yanjr.system.entity.SysDict;

public interface SysDictDao extends BaseDao<String, SysDict> {
	
	public List<SysDict> findAll(SysDict dict) throws SQLException;
	
	public SysDict findOne(String id) throws SQLException;
	
	public int save(SysDict dict) throws SQLException;
	
	public int update(SysDict dict) throws SQLException;
	/**
	 * 通过id删除数据
	 * @param id
	 * @param type 0：真删除，1：假删
	 * @return
	 * @throws SQLException
	 */
	public int delete(String id, int type) throws SQLException;
	
	public int count(String where) throws SQLException;
	
	public List<SysDict> findBySql(String sql) throws SQLException;
	
	public List<SysDict> findByWhere(String where) throws SQLException;
	
	public List<SysDict> findAllType() throws SQLException;
}
